Optimal. Leaf size=217 \[ \frac{5 a^4 (2 A+B-C) \sin (c+d x)}{2 d}+\frac{a^4 (2 A+8 B+13 C) \tanh ^{-1}(\sin (c+d x))}{2 d}-\frac{(2 A+B-C) \sin (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{2 d}-\frac{(8 A-3 B-18 C) \sin (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{6 d}+\frac{1}{2} a^4 x (12 A+13 B+8 C)+\frac{a (4 A+3 B) \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^3}{6 d}+\frac{A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^4}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.601841, antiderivative size = 217, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.122, Rules used = {4086, 4017, 4018, 3996, 3770} \[ \frac{5 a^4 (2 A+B-C) \sin (c+d x)}{2 d}+\frac{a^4 (2 A+8 B+13 C) \tanh ^{-1}(\sin (c+d x))}{2 d}-\frac{(2 A+B-C) \sin (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{2 d}-\frac{(8 A-3 B-18 C) \sin (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{6 d}+\frac{1}{2} a^4 x (12 A+13 B+8 C)+\frac{a (4 A+3 B) \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^3}{6 d}+\frac{A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^4}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4086
Rule 4017
Rule 4018
Rule 3996
Rule 3770
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+a \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}+\frac{\int \cos ^2(c+d x) (a+a \sec (c+d x))^4 (a (4 A+3 B)-a (2 A-3 C) \sec (c+d x)) \, dx}{3 a}\\ &=\frac{a (4 A+3 B) \cos (c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{6 d}+\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}+\frac{\int \cos (c+d x) (a+a \sec (c+d x))^3 \left (a^2 (16 A+15 B+6 C)-6 a^2 (2 A+B-C) \sec (c+d x)\right ) \, dx}{6 a}\\ &=\frac{a (4 A+3 B) \cos (c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{6 d}+\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac{(2 A+B-C) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}+\frac{\int \cos (c+d x) (a+a \sec (c+d x))^2 \left (2 a^3 (22 A+18 B+3 C)-2 a^3 (8 A-3 B-18 C) \sec (c+d x)\right ) \, dx}{12 a}\\ &=\frac{a (4 A+3 B) \cos (c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{6 d}+\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac{(2 A+B-C) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac{(8 A-3 B-18 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}+\frac{\int \cos (c+d x) (a+a \sec (c+d x)) \left (30 a^4 (2 A+B-C)+6 a^4 (2 A+8 B+13 C) \sec (c+d x)\right ) \, dx}{12 a}\\ &=\frac{5 a^4 (2 A+B-C) \sin (c+d x)}{2 d}+\frac{a (4 A+3 B) \cos (c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{6 d}+\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac{(2 A+B-C) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac{(8 A-3 B-18 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}-\frac{\int \left (-6 a^5 (12 A+13 B+8 C)-6 a^5 (2 A+8 B+13 C) \sec (c+d x)\right ) \, dx}{12 a}\\ &=\frac{1}{2} a^4 (12 A+13 B+8 C) x+\frac{5 a^4 (2 A+B-C) \sin (c+d x)}{2 d}+\frac{a (4 A+3 B) \cos (c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{6 d}+\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac{(2 A+B-C) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac{(8 A-3 B-18 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}+\frac{1}{2} \left (a^4 (2 A+8 B+13 C)\right ) \int \sec (c+d x) \, dx\\ &=\frac{1}{2} a^4 (12 A+13 B+8 C) x+\frac{a^4 (2 A+8 B+13 C) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{5 a^4 (2 A+B-C) \sin (c+d x)}{2 d}+\frac{a (4 A+3 B) \cos (c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{6 d}+\frac{A \cos ^2(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac{(2 A+B-C) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{2 d}-\frac{(8 A-3 B-18 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{6 d}\\ \end{align*}
Mathematica [B] time = 6.31162, size = 1518, normalized size = 7. \[ \text{result too large to display} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.122, size = 280, normalized size = 1.3 \begin{align*}{\frac{A\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{2}{a}^{4}}{3\,d}}+{\frac{20\,A{a}^{4}\sin \left ( dx+c \right ) }{3\,d}}+{\frac{B{a}^{4}\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) }{2\,d}}+{\frac{13\,B{a}^{4}x}{2}}+{\frac{13\,B{a}^{4}c}{2\,d}}+{\frac{{a}^{4}C\sin \left ( dx+c \right ) }{d}}+2\,{\frac{A{a}^{4}\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{d}}+6\,{a}^{4}Ax+6\,{\frac{A{a}^{4}c}{d}}+4\,{\frac{B{a}^{4}\sin \left ( dx+c \right ) }{d}}+4\,{a}^{4}Cx+4\,{\frac{C{a}^{4}c}{d}}+{\frac{13\,{a}^{4}C\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}}+4\,{\frac{B{a}^{4}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+4\,{\frac{{a}^{4}C\tan \left ( dx+c \right ) }{d}}+{\frac{A{a}^{4}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{B{a}^{4}\tan \left ( dx+c \right ) }{d}}+{\frac{{a}^{4}C\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.965466, size = 400, normalized size = 1.84 \begin{align*} -\frac{4 \,{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{4} - 12 \,{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 48 \,{\left (d x + c\right )} A a^{4} - 3 \,{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{4} - 72 \,{\left (d x + c\right )} B a^{4} - 48 \,{\left (d x + c\right )} C a^{4} + 3 \, C a^{4}{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 6 \, A a^{4}{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 24 \, B a^{4}{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, C a^{4}{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 72 \, A a^{4} \sin \left (d x + c\right ) - 48 \, B a^{4} \sin \left (d x + c\right ) - 12 \, C a^{4} \sin \left (d x + c\right ) - 12 \, B a^{4} \tan \left (d x + c\right ) - 48 \, C a^{4} \tan \left (d x + c\right )}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.565319, size = 486, normalized size = 2.24 \begin{align*} \frac{6 \,{\left (12 \, A + 13 \, B + 8 \, C\right )} a^{4} d x \cos \left (d x + c\right )^{2} + 3 \,{\left (2 \, A + 8 \, B + 13 \, C\right )} a^{4} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \,{\left (2 \, A + 8 \, B + 13 \, C\right )} a^{4} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (2 \, A a^{4} \cos \left (d x + c\right )^{4} + 3 \,{\left (4 \, A + B\right )} a^{4} \cos \left (d x + c\right )^{3} + 2 \,{\left (20 \, A + 12 \, B + 3 \, C\right )} a^{4} \cos \left (d x + c\right )^{2} + 6 \,{\left (B + 4 \, C\right )} a^{4} \cos \left (d x + c\right ) + 3 \, C a^{4}\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.3056, size = 468, normalized size = 2.16 \begin{align*} \frac{3 \,{\left (12 \, A a^{4} + 13 \, B a^{4} + 8 \, C a^{4}\right )}{\left (d x + c\right )} + 3 \,{\left (2 \, A a^{4} + 8 \, B a^{4} + 13 \, C a^{4}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 3 \,{\left (2 \, A a^{4} + 8 \, B a^{4} + 13 \, C a^{4}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{6 \,{\left (2 \, B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 7 \, C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 9 \, C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{2}} + \frac{2 \,{\left (30 \, A a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 21 \, B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 6 \, C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 76 \, A a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 48 \, B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 12 \, C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 54 \, A a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 27 \, B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 6 \, C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]